package com.example.mydemo.controller.hc;

import com.example.mydemo.model.ClockVO;
import com.example.mydemo.model.tableVO;
import com.example.mydemo.service.impl.ClockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


import java.util.List;

@Controller
@RequestMapping()
public class ClockController {
    @Autowired
    private ClockService IClockService;

    @GetMapping("/getdakapage")
    @ResponseBody
    public tableVO selectDeptCount(@RequestParam Long page, @RequestParam Long limit) {
//        Page<DakaVO> usepage = new Page<>(page, limit); // 创建分页对象，当前页为1，每页显示5条记录
        List<ClockVO> b = IClockService.selectDakaCount();
        tableVO a = new tableVO();
        a.setCode(0L);
        a.setMsg("");
        a.setData(b);
        a.setCount((long) b.size());
        return a;
    }


}
